/*
 * @Author: zhuxiaoyi
 * @Date: 2024-04-24 10:51:07
 * @LastEditor: zhuxiaoyi
 * @LastEditTime: 2024-05-06 12:15:19
 * @Description:
 */
import { ApiProperty } from '@midwayjs/swagger';

export class addGraphDto {
  @ApiProperty({
    example: '算法流程1',
    description: '流程名称',
  })
  name: string;

  @ApiProperty({
    example:
      '{"cells":[{"position":{"x":390,"y":50},"size":{"width":220,"height":56},"view":"vue-shape-view","shape":"custom-vue-node","ports":{"groups":{"circle":{"position":{"name":"ellipseSpread","args":{"compensateRotate":true}},"attrs":{"circle":{"magnet":true,"stroke":"#8f8f8f","r":5}}}},"items":[{"id":"port_0","group":"circle"},{"id":"port_1","group":"circle"}]},"id":"f2f5a643-f2fb-426d-a871-3c8faf274478","data":{"id":"8","label":"01_水体提取_GF1_WFV0829","status":"pennding","progress":0},"zIndex":1},{"position":{"x":200,"y":170},"size":{"width":220,"height":56},"view":"vue-shape-view","shape":"custom-vue-node","ports":{"groups":{"circle":{"position":{"name":"ellipseSpread","args":{"compensateRotate":true}},"attrs":{"circle":{"magnet":true,"stroke":"#8f8f8f","r":5}}}},"items":[{"id":"port_0","group":"circle"},{"id":"port_1","group":"circle"}]},"id":"6cb0762c-08d7-4f21-b949-ee10f2c3acd8","data":{"id":"12","label":"02_水体提取_GF1_WFV_030602","status":"pennding","progress":0},"zIndex":2},{"position":{"x":580,"y":170},"size":{"width":220,"height":56},"view":"vue-shape-view","shape":"custom-vue-node","ports":{"groups":{"circle":{"position":{"name":"ellipseSpread","args":{"compensateRotate":true}},"attrs":{"circle":{"magnet":true,"stroke":"#8f8f8f","r":5}}}},"items":[{"id":"port_0","group":"circle"},{"id":"port_1","group":"circle"}]},"id":"473e805c-7e09-40be-8cfc-b289e4acce28","data":{"id":"12","label":"02_水体提取_GF1_WFV_030602","status":"pennding","progress":0},"zIndex":3},{"position":{"x":200,"y":320},"size":{"width":220,"height":56},"view":"vue-shape-view","shape":"custom-vue-node","ports":{"groups":{"circle":{"position":{"name":"ellipseSpread","args":{"compensateRotate":true}},"attrs":{"circle":{"magnet":true,"stroke":"#8f8f8f","r":5}}}},"items":[{"id":"port_0","group":"circle"},{"id":"port_1","group":"circle"}]},"id":"8f41b0a6-2689-47c5-9295-3580a2982c8f","data":{"id":"13","label":"03_水体提取_GF1_WFV3_E882_N323_20171228","status":"pennding","progress":0},"zIndex":4},{"position":{"x":580,"y":320},"size":{"width":220,"height":56},"view":"vue-shape-view","shape":"custom-vue-node","ports":{"groups":{"circle":{"position":{"name":"ellipseSpread","args":{"compensateRotate":true}},"attrs":{"circle":{"magnet":true,"stroke":"#8f8f8f","r":5}}}},"items":[{"id":"port_0","group":"circle"},{"id":"port_1","group":"circle"}]},"id":"e417ea76-aeb9-4f52-96be-f478037abdc6","data":{"id":"13","label":"03_水体提取_GF1_WFV3_E882_N323_20171228","status":"pennding","progress":0},"zIndex":5},{"position":{"x":400,"y":490},"size":{"width":220,"height":56},"view":"vue-shape-view","shape":"custom-vue-node","ports":{"groups":{"circle":{"position":{"name":"ellipseSpread","args":{"compensateRotate":true}},"attrs":{"circle":{"magnet":true,"stroke":"#8f8f8f","r":5}}}},"items":[{"id":"port_0","group":"circle"},{"id":"port_1","group":"circle"}]},"id":"ef134598-9d07-4ef3-9be4-a74922bb353b","data":{"id":"14","label":"04_水体提取_GF1_WFV3_E882_N323_20171228","status":"pennding","progress":0},"zIndex":6},{"shape":"edge","id":"0cde9a93-ea2a-4dd8-83db-ca2fa13ec362","source":{"cell":"f2f5a643-f2fb-426d-a871-3c8faf274478","port":"port_1"},"target":{"cell":"6cb0762c-08d7-4f21-b949-ee10f2c3acd8","port":"port_0"},"zIndex":7},{"shape":"edge","id":"a0830f27-5f79-4310-a6b4-a2b3e5beaede","source":{"cell":"f2f5a643-f2fb-426d-a871-3c8faf274478","port":"port_1"},"target":{"cell":"473e805c-7e09-40be-8cfc-b289e4acce28","port":"port_0"},"zIndex":8},{"shape":"edge","id":"cec032c6-aad4-468e-896b-3e45cd2f01dd","source":{"cell":"6cb0762c-08d7-4f21-b949-ee10f2c3acd8","port":"port_1"},"target":{"cell":"8f41b0a6-2689-47c5-9295-3580a2982c8f","port":"port_0"},"zIndex":9},{"shape":"edge","id":"4398a4cd-768b-4067-b5e3-3719add53db3","source":{"cell":"473e805c-7e09-40be-8cfc-b289e4acce28","port":"port_1"},"target":{"cell":"e417ea76-aeb9-4f52-96be-f478037abdc6","port":"port_0"},"zIndex":10},{"shape":"edge","id":"5eb0ca91-e870-40e0-bb4b-d8002fffbef3","source":{"cell":"e417ea76-aeb9-4f52-96be-f478037abdc6","port":"port_1"},"target":{"cell":"ef134598-9d07-4ef3-9be4-a74922bb353b","port":"port_0"},"zIndex":11},{"shape":"edge","id":"e1777fbe-0c2c-4788-9602-c7d9820a02b7","source":{"cell":"8f41b0a6-2689-47c5-9295-3580a2982c8f","port":"port_1"},"target":{"cell":"ef134598-9d07-4ef3-9be4-a74922bb353b","port":"port_0"},"zIndex":12}]}',
    description: '有向图',
  })
  graph: string;
}

export class updateGraphDto {
  @ApiProperty({
    example: '11',
    description: '流程id',
  })
  id: number;

  @ApiProperty({
    example: '算法流程1',
    description: '流程名称',
  })
  name: string;

  @ApiProperty({
    example:
      '{"cells":[{"position":{"x":390,"y":50},"size":{"width":220,"height":56},"view":"vue-shape-view","shape":"custom-vue-node","ports":{"groups":{"circle":{"position":{"name":"ellipseSpread","args":{"compensateRotate":true}},"attrs":{"circle":{"magnet":true,"stroke":"#8f8f8f","r":5}}}},"items":[{"id":"port_0","group":"circle"},{"id":"port_1","group":"circle"}]},"id":"f2f5a643-f2fb-426d-a871-3c8faf274478","data":{"id":"8","label":"01_水体提取_GF1_WFV0829","status":"pennding","progress":0},"zIndex":1},{"position":{"x":200,"y":170},"size":{"width":220,"height":56},"view":"vue-shape-view","shape":"custom-vue-node","ports":{"groups":{"circle":{"position":{"name":"ellipseSpread","args":{"compensateRotate":true}},"attrs":{"circle":{"magnet":true,"stroke":"#8f8f8f","r":5}}}},"items":[{"id":"port_0","group":"circle"},{"id":"port_1","group":"circle"}]},"id":"6cb0762c-08d7-4f21-b949-ee10f2c3acd8","data":{"id":"12","label":"02_水体提取_GF1_WFV_030602","status":"pennding","progress":0},"zIndex":2},{"position":{"x":580,"y":320},"size":{"width":220,"height":56},"view":"vue-shape-view","shape":"custom-vue-node","ports":{"groups":{"circle":{"position":{"name":"ellipseSpread","args":{"compensateRotate":true}},"attrs":{"circle":{"magnet":true,"stroke":"#8f8f8f","r":5}}}},"items":[{"id":"port_0","group":"circle"},{"id":"port_1","group":"circle"}]},"id":"e417ea76-aeb9-4f52-96be-f478037abdc6","data":{"id":"13","label":"03_水体提取_GF1_WFV3_E882_N323_20171228","status":"pennding","progress":0},"zIndex":5},{"shape":"edge","id":"0cde9a93-ea2a-4dd8-83db-ca2fa13ec362","zIndex":7,"source":{"cell":"f2f5a643-f2fb-426d-a871-3c8faf274478","port":"port_1"},"target":{"cell":"6cb0762c-08d7-4f21-b949-ee10f2c3acd8","port":"port_0"}},{"position":{"x":200,"y":320},"size":{"width":220,"height":56},"view":"vue-shape-view","shape":"custom-vue-node","ports":{"groups":{"circle":{"position":{"name":"ellipseSpread","args":{"compensateRotate":true}},"attrs":{"circle":{"magnet":true,"stroke":"#8f8f8f","r":5}}}},"items":[{"id":"port_0","group":"circle"},{"id":"port_1","group":"circle"}]},"id":"2a6c796a-2fa0-41f2-9da5-24968b0cdde4","data":{"id":"24","label":"Idw差值计算_GF1_WFV0829","status":"pennding","progress":0},"zIndex":12},{"shape":"edge","id":"bc7df1cd-e94a-4bf9-a32b-c086fd48e898","zIndex":13,"source":{"cell":"6cb0762c-08d7-4f21-b949-ee10f2c3acd8","port":"port_1"},"target":{"cell":"2a6c796a-2fa0-41f2-9da5-24968b0cdde4","port":"port_0"}},{"position":{"x":580,"y":160},"size":{"width":220,"height":56},"view":"vue-shape-view","shape":"custom-vue-node","ports":{"groups":{"circle":{"position":{"name":"ellipseSpread","args":{"compensateRotate":true}},"attrs":{"circle":{"magnet":true,"stroke":"#8f8f8f","r":5}}}},"items":[{"id":"port_0","group":"circle"},{"id":"port_1","group":"circle"}]},"id":"fd9a9e3e-2f47-4dd9-a856-1f9071541506","data":{"id":"22","label":"PML模型计算_GF1_WFV0829","status":"pennding","progress":0},"zIndex":15},{"shape":"edge","id":"a2b112b6-1442-4cb4-a600-6c368c89722c","zIndex":16,"source":{"cell":"f2f5a643-f2fb-426d-a871-3c8faf274478","port":"port_1"},"target":{"cell":"fd9a9e3e-2f47-4dd9-a856-1f9071541506","port":"port_0"}},{"shape":"edge","id":"a942b852-8488-42f4-b1f3-ae56a1673444","zIndex":17,"source":{"cell":"fd9a9e3e-2f47-4dd9-a856-1f9071541506","port":"port_1"},"target":{"cell":"e417ea76-aeb9-4f52-96be-f478037abdc6","port":"port_0"}}]}',
    description: '有向图',
  })
  graph: string;
}

export class GetGraphListDto {
  @ApiProperty({
    example: '1',
    description: '页码',
  })
  page_index: number;

  @ApiProperty({
    example: '1',
    description: '页码长度',
  })
  page_size: number;

  @ApiProperty({
    description: '流程关键字',
  })
  keyword: string;
}

export class nodeDto {
  @ApiProperty({
    example: '71745ab7-b041-48f2-a50a-10ba9baa1f2a',
    description: '节点ID',
  })
  id: string;
}
export class nodeDto1 {
  @ApiProperty({
    example: '71745ab7-b041-48f2-a50a-10ba9baa1f2a',
    description: '节点ID',
  })
  nodeId: string;
}
export class pauseDto {
  @ApiProperty({
    example: '71745ab7-b041-48f2-a50a-10ba9baa1f2a',
    description: '节点ID',
  })
  id: string;
  @ApiProperty({
    example: true,
    description: '运行时暂停',
  })
  status: boolean;
}
export class changeParallelDto {
  @ApiProperty({
    example: '71745ab7-b041-48f2-a50a-10ba9baa1f2a',
    description: '节点ID',
  })
  id: string;
  @ApiProperty({
    example: true,
    description: '并行数量',
  })
  changeParallel: 1;
}

export class eidtNodeParamsDto {
  @ApiProperty({
    example: '71745ab7-b041-48f2-a50a-10ba9baa1f2a',
    description: '节点ID',
  })
  id: string;
  @ApiProperty({
    example:
      '[{"param_name":"DLXB","default_value":"Classify2","zh_name":"功能标识"},{"param_name":"inputFile","default_value":"D:/Temp/GF1_WFV0829/GF1_WFV0829.tif","zh_name":"输入文件"},{"param_name":"ruleFile","default_value":"D:/Temp/BGC_test_data/BGC_water.clf","zh_name":"规则文件"},{"param_name":"segBlock","default_value":"800","zh_name":"分割尺度"},{"param_name":"compressRatio","default_value":"0.2","zh_name":"压缩因子"},{"param_name":"smoothRatio","default_value":"0.2","zh_name":"平滑因子"},{"param_name":"outputFile","default_value":"D:/Temp/GF1_WFV0829/GF1_WFV0829.shp","zh_name":"输出文件"},{"param_name":"shpZipFile","default_value":"D:/Temp/GF1_WFV0829/GF1_WFV0829_shp.zip","zh_name":"矢量压缩文件"},{"param_name":"fileName","default_value":"GF1_WFV0829","zh_name":"影像名称"},{"param_name":"fileDate","default_value":"2021/05/17","zh_name":"文件日期"},{"param_name":"satType","default_value":"S2X_MSI","zh_name":"卫星类型"},{"param_name":"location","default_value":"班戈错","zh_name":"影像地区"},{"param_name":"gisInfo","default_value":[88.381872,31.482,89.3952,32.160239999999995],"zh_name":"坐标信息"}]',
    description: '算法参数',
  })
  runTimeParams: string;
}
